﻿@using Telerik.Web.Mvc.UI
@using MvcFront.Models;
@model IEnumerable<UserDocumentListViewModel>

@{
    ViewBag.Title = "Details";
}

<h2>Документы группы</h2>
@(Html.Telerik().Grid(Model)
        .Name("UserGroupDocumentsGrid")
                   .Columns(columns =>
                   {
                       columns.AutoGenerate(column =>
                       {
                           if (column.Member == "DocumentId" || column.Member == "IsReadOnly")
                               column.Visible = false;
                       });
                       columns.Command(command =>
                       {
                           command.Custom("ViewDocuments").Text("Просмотреть документ")
                           .DataRouteValues(route => route.Add(o => o.DocumentId).RouteKey("id"))
                           .Action("DocumentDetails", "DocumentAppointment")
                           .HtmlAttributes(new { style = "text-align: center" });
                       });
                   })
                 .Sortable()
                .Pageable()

    )
